package _220328;

import java.util.Scanner;

/**
 * @author ShadowLim
 * @create 2022-03-28-12:24
 */
public class 修改数组 {
    static int N = 100010;
    static int[] a = new int[N];
    static int[] f = new int[1000010];  // 祖宗节点数组
    static int n;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        for (int i = 1; i <= n; i++) {
            a[i] = scanner.nextInt();
        }
        // 初始化
        for (int i = 1; i <= 1000003; i++) {
            f[i] = i;
        }
        for (int i = 1; i <= n; i++) {
            a[i] = find(a[i]);
            f[a[i]] = find(a[i] + 1);
        }
        for (int i = 1; i <= n; i++) {
            System.out.print(a[i] + " ");
        }
        System.out.println();
    }

    private static int find(int x) {
        if (f[x] != x) {
            f[x] = find(f[x]);
        }
        return f[x];
    }
}
